exports.install = function (Vue, options) {
    // 日期格式化
    Vue.prototype.getFormatDate = function (date) {
        var month = date.getMonth() + 1
        var strDate = date.getDate()
        if (month >= 1 && month <= 9) {
            month = '0' + month
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = '0' + strDate
        }
        var currentDate = date.getFullYear() + '-' + month + '-' + strDate
        return currentDate
    }
    // 日期时间格式化
    Vue.prototype.getFormatDatetime = function (date) {
        var month = date.getMonth() + 1
        var strDate = date.getDate()
        if (month >= 1 && month <= 9) {
            month = '0' + month
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = '0' + strDate
        }
        let hh = date.getHours();
        let mf = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
        let ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
        var currentDatetime = date.getFullYear() + '-' + month + '-' + strDate + ' ' + hh + ':' + mf + ':' + ss;
        return currentDatetime
    }
}
